package com.aaa.controller;

import com.aaa.params.LoginParam;
import com.aaa.result.Result;
import com.aaa.service.SysUserService;
import com.aaa.vo.LoginVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author : luoBo
 * 登录需要的东西
 */
@RestController
@RequestMapping("/sys/login")
public class LoginController {


    @Autowired
    private SysUserService sysUserService;
    @PostMapping("/backendLogin")
    public Result<LoginVO> backendLogin(@RequestBody LoginParam loginParam){
        LoginVO loginVO =  sysUserService.backendLogin(loginParam);
        return Result.OK(loginVO);
    }

}
